package com.whynot.frame.springMvc.rest;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.whynot.frame.springMvc.annotation.Controller;
import com.whynot.frame.springMvc.annotation.RequestMapping;
import com.whynot.frame.springMvc.annotation.Resource;
import com.whynot.frame.springMvc.service.TestService;

@Controller
@RequestMapping(value = "/testRest")
public class TestRest {
	
	@Resource(name="testService")
    TestService testService;
	
	@RequestMapping(value = "/test")
	public void test(HttpServletRequest request,HttpServletResponse response){
		try {
			response.getWriter().write(testService.test());
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
